home *** CD-ROM | disk | FTP | other *** search
- unit AxDesktop_TLB;
-
- { This file contains pascal declarations imported from a type library.
- This file will be written during each import or refresh of the type
- library editor. Changes to this file will be discarded during the
- refresh process. }
-
- { AxDesktop Library }
- { Version 1.0 }
-
- { Conversion log:
- Hint: Class is not registered. Ambient properties cannot be determined.
- }
-
- interface
-
- uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
-
- const
- LIBID_AxDesktop: TGUID = '{1E5161AB-D086-11D1-8CDD-E61AF2D4AD0C}';
-
- const
-
- { Component class GUIDs }
- Class_XDesktop: TGUID = '{1E5161AE-D086-11D1-8CDD-E61AF2D4AD0C}';
-
- type
-
- { Forward declarations: Interfaces }
- IXDesktop = interface;
- IXDesktopDisp = dispinterface;
- IXDesktopEvents = dispinterface;
-
- { Forward declarations: CoClasses }
- XDesktop = IXDesktop;
-
- { Dispatch interface for XDesktop Control }
-
- IXDesktop = interface(IDispatch)
- ['{1E5161AC-D086-11D1-8CDD-E61AF2D4AD0C}']
- function Get_Font: Font; safecall;
- procedure Set_Font(const Value: Font); safecall;
- function Get_ItemCount: Integer; safecall;
- procedure Set_ItemCount(Value: Integer); safecall;
- function Get_TextColor: TColor; safecall;
- procedure Set_TextColor(Value: TColor); safecall;
- function Get_TextBackgroundColor: TColor; safecall;
- procedure Set_TextBackgroundColor(Value: TColor); safecall;
- procedure AboutBox; safecall;
- function Get_Visible: WordBool; safecall;
- procedure Set_Visible(Value: WordBool); safecall;
- property Font: Font read Get_Font write Set_Font;
- property ItemCount: Integer read Get_ItemCount write Set_ItemCount;
- property TextColor: TColor read Get_TextColor write Set_TextColor;
- property TextBackgroundColor: TColor read Get_TextBackgroundColor write Set_TextBackgroundColor;
- property Visible: WordBool read Get_Visible write Set_Visible;
- end;
-
- { DispInterface declaration for Dual Interface IXDesktop }
-
- IXDesktopDisp = dispinterface
- ['{1E5161AC-D086-11D1-8CDD-E61AF2D4AD0C}']
- property Font: Font dispid 1;
- property ItemCount: Integer dispid 2;
- property TextColor: TColor dispid 3;
- property TextBackgroundColor: TColor dispid 4;
- procedure AboutBox; dispid -552;
- property Visible: WordBool dispid 5;
- end;
-
- { Events interface for XDesktop Control }
-
- IXDesktopEvents = dispinterface
- ['{1E5161AD-D086-11D1-8CDD-E61AF2D4AD0C}']
- end;
-
- { XDesktopControl }
-
- TXDesktop = class(TOleControl)
- private
- FIntf: IXDesktop;
- function GetControlInterface: IXDesktop;
- protected
- procedure CreateControl;
- procedure InitControlData; override;
- function GetTOleEnumProp(Index: Integer): TOleEnum;
- procedure SetTOleEnumProp(Index: Integer; Value: TOleEnum);
- public
- procedure AboutBox;
- property ControlInterface: IXDesktop read GetControlInterface;
- published
- property Font: TFont index 1 read GetTFontProp write SetTFontProp stored False;
- property ItemCount: Integer index 2 read GetIntegerProp write SetIntegerProp stored False;
- property TextColor: TColor index 3 read GetTColorProp write SetTColorProp stored False;
- property TextBackgroundColor: TColor index 4 read GetTColorProp write SetTColorProp stored False;
- property Visible: WordBool index 5 read GetWordBoolProp write SetWordBoolProp stored False;
- end;
-
- procedure Register;
-
- implementation
-
- uses ComObj;
-
- procedure TXDesktop.InitControlData;
- const
- CTFontIDs: array [0..0] of Integer = (
- $00000001);
- CControlData: TControlData = (
- ClassID: '{1E5161AE-D086-11D1-8CDD-E61AF2D4AD0C}';
- EventIID: '';
- EventCount: 0;
- EventDispIDs: nil;
- LicenseKey: nil;
- Flags: $00000000;
- Version: 300;
- FontCount: 1;
- FontIDs: @CTFontIDs);
- begin
- ControlData := @CControlData;
- end;
-
- procedure TXDesktop.CreateControl;
-
- procedure DoCreate;
- begin
- FIntf := IUnknown(OleObject) as IXDesktop;
- end;
-
- begin
- if FIntf = nil then DoCreate;
- end;
-
- function TXDesktop.GetControlInterface: IXDesktop;
- begin
- CreateControl;
- Result := FIntf;
- end;
-
- function TXDesktop.GetTOleEnumProp(Index: Integer): TOleEnum;
- begin
- Result := GetIntegerProp(Index);
- end;
-
- procedure TXDesktop.SetTOleEnumProp(Index: Integer; Value: TOleEnum);
- begin
- SetIntegerProp(Index, Value);
- end;
-
- procedure TXDesktop.AboutBox;
- begin
- CreateControl;
- FIntf.AboutBox;
- end;
-
-
- procedure Register;
- begin
- RegisterComponents('ActiveX', [TXDesktop]);
- end;
-
- end.
-